using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using UnityEngine.Audio;
public class Menu : MonoBehaviour
{
  public GameObject pauseMenu;

  public AudioMixer AudioMixer;

  public void StartGame(){
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex+1);
  }

  public void Quit(){
    Application.Quit();
  }

  public void pauseGame(){

    pauseMenu.SetActive(true);
    Time.timeScale = 0f;
  }

  public void reauseGame(){
    pauseMenu.SetActive(false);
    Time.timeScale = 1f;
  }

  public void SetVolume(float value){
    AudioMixer.SetFloat("MainVolume", value);
  }

}
